-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly cancel blocked requests (attempt 2) #7030
Conversation
f2655fe
to
d73b71f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also updated the adblocking tests to use the more modern EvalJs
instead of ExecuteScriptAndExtractBool
, which made it a little easier to debug.
if (ctx_->cancel_request_explicitly) { | ||
OnRequestError(network::URLLoaderCompletionStatus(net::ERR_ABORTED)); | ||
if (!ctx_->ShouldMockRequest()) { | ||
OnRequestError(network::URLLoaderCompletionStatus(net::ERR_BLOCKED_BY_CLIENT)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsclifton I just had to change net::ERR_ABORTED
to net::ERR_BLOCKED_BY_CLIENT
. The 4 test failures were occurring because the XMLHttpRequest
s were having their onabort
handlers triggered instead of onerror
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 😄👍
The XHRs from the 4 failing tests were triggering `onabort`, not `onerror`.
d73b71f
to
f157181
Compare
These tests had to be updated as well, since they also use the
|
Thanks for fixing the tests!
Wondering, does this change (from |
@iefremov webcompat was the motivating reason behind this change actually. Adblocking extensions only have the ability to do |
@bsclifton anything left blocking this, or can we merge? |
CI failures are known, merging. |
Verification PASSED on
Verification PASSED on
|
Manual re-opening of #6632
This was merged and then reverted with #7028
Fixes brave/brave-browser#10063
This reverts commit 12ea1cd, reversing
changes made to fbce153.
Submitter Checklist:
npm run lint
,npm run gn_check
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).QA/Yes
orQA/No
) to the associated issuerelease-notes/include
orrelease-notes/exclude
) to the associated issueTest Plan:
The below pages have all been observed to crash with OOM errors about 20 seconds after loading without this change, but should not crash once this change is in place:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.